package training_process.TrainingIV;

/**
 * Author by KyrieC
 * Created by sheting on 2023/11/21
 */
public class Subtraction extends BinaryOperation {
    public Subtraction(int operand1, int operand2) {
        super(operand1, operand2);
    }

    @Override
    public int getResult() {
        if (operand1 > operand2)
            return operand1 - operand2;
        return operand2 - operand1;
    }

    @Override
    public String getOperator() {
        return "-";
    }
}

